package com.ysd.lis.controller.lab;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.lab.LabFinanceSettle;
import com.ysd.lis.request.lab.FinanceSettleDto;
import com.ysd.lis.request.lab.LabFinanceSettleDto;
import com.ysd.lis.service.lab.LabFinanceSettleService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 通道号管理表 前端控制器
 * </p>
 *
 * @author prs
 * @since 2024-10-29
 */
@RestController
@RequestMapping("/lab/financeSettle")
public class LabFinanceSettleController extends BaseController {

    @Autowired
    LabFinanceSettleService labFinanceSettleService;
    @ApiOperation("查询")
    @GetMapping("/findFinanceSettleList")
    public Result findFinanceSettleList(FinanceSettleDto param) {
        return labFinanceSettleService.findFinanceSettleList(param);
    }


    @ApiOperation("查询")
    @GetMapping("/findCompanyAndFinanceSettleList")
    public Result findCompanyAndFinanceSettleList(FinanceSettleDto param) {
        return labFinanceSettleService.findCompanyAndFinanceSettleList(param);
    }

    @ApiOperation("新增或修改")
    @PostMapping("/saveOrUpdateFinanceSettle")
    public Result saveOrUpdateFinanceSettle(@RequestBody LabFinanceSettleDto labFinanceSettleDto) {
        return labFinanceSettleService.saveOrUpdateFinanceSettle(labFinanceSettleDto);
    }

    @ApiOperation("审核")
    @PostMapping("/chkFinanceSettle")
    public Result chkFinanceSettle(@RequestBody LabFinanceSettle labFinanceSettle) {
        return labFinanceSettleService.chkFinanceSettle(labFinanceSettle);
    }

    @ApiOperation("查询")
    @GetMapping("/findFinanceSettleById")
    public Result findFinanceSettleById(LabFinanceSettle labFinanceSettle) {
        return labFinanceSettleService.findFinanceSettleById(labFinanceSettle);
    }

    @ApiOperation("批量删除")
    @PostMapping("/batchDeleteFinanceSettleList")
    public Result batchDeleteFinanceSettleList(@RequestBody FinanceSettleDto dto){
        return  labFinanceSettleService.batchDeleteFinanceSettleList(dto);
    }


    @ApiOperation("查询")
    @GetMapping("/findReqMainBySettleList")
    public Result findReqMainBySettleList(FinanceSettleDto param) {
        return labFinanceSettleService.findReqMainBySettleList(param);
    }

}
